In [4]:
####
suppressMessages(library(ArchR))
ss <- function(x, pattern, slot = 1, ...) { sapply(strsplit(x = x, split = pattern, ...), '[', slot) }
options(stringsAsFactors = F)
options(repr.plot.width=11, repr.plot.height=8.5)
suppressMessages(library(Seurat))
suppressMessages(library(SingleCellExperiment))
In [5]:
##################################
### set Arrow File parameters ####
addArchRThreads(threads = 12)

##################################
### load rheMac10 ArchR genome ###
GENOMEDIR='/home/bnphan/resources/genomes/rn7'
load(file.path(GENOMEDIR,'rn7_liftoff_mm10NcbiRefSeq_ArchR_annotations.rda'))
Setting default number of Parallel threads to 12.

In [6]:
PROJDIR='../../../data/tidy_data/ArchRProjects'
ARCHDIR=file.path(PROJDIR,'Rat_Transgen_NAc_scATAC_MSN')
proj = loadArchRProject(ARCHDIR)
Successfully loaded ArchRProject!


                                                   / |
                                                 /    \
            .                                  /      |.
            \\\                              /        |.
              \\\                          /           `|.
                \\\                      /              |.
                  \                    /                |\
                  \\#####\           /                  ||
                ==###########>      /                   ||
                 \\##==......\    /                     ||
            ______ =       =|__ /__                     ||      \\\
        ,--' ,----`-,__ ___/'  --,-`-===================##========>
       \               '        ##_______ _____ ,--,__,=##,__   ///
        ,    __==    ___,-,__,--'#'  ==='      `-'    | ##,-/
        -,____,---'       \\####\\________________,--\\_##,/
           ___      .______        ______  __    __  .______      
          /   \     |   _  \      /      ||  |  |  | |   _  \     
         /  ^  \    |  |_)  |    |  ,----'|  |__|  | |  |_)  |    
        /  /_\  \   |      /     |  |     |   __   | |      /     
       /  _____  \  |  |\  \\___ |  `----.|  |  |  | |  |\  \\___.
      /__/     \__\ | _| `._____| \______||__|  |__| | _| `._____|
    

In [7]:
proj <- addImputeWeights(proj, reducedDims = "HarmonyX300")
ArchR logging to : ArchRLogs/ArchR-addImputeWeights-25b9337307ede-Date-2022-12-05_Time-08-48-30.log
If there is an issue, please report to github with logFile!

2022-12-05 08:48:30 : Computing Impute Weights Using Magic (Cell 2018), 0 mins elapsed.

In [8]:
p1 <- plotEmbedding( proj, colorBy = "cellColData", name = "Sample", embedding = "UMAPX300")
p2 <- plotEmbedding( proj, colorBy = "cellColData", name = "Sire", embedding = "UMAPX300")
p3 <- plotEmbedding( proj, colorBy = "cellColData", name = "ClustersX300", embedding = "UMAPX300")

ggAlignPlots(p3,p1, type = "h")
ggAlignPlots(p3,p2, type = "h")
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b935f5e9a66-Date-2022-12-05_Time-08-49-07.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b935f5e9a66-Date-2022-12-05_Time-08-49-07.log

ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b932cf584e7-Date-2022-12-05_Time-08-49-08.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b932cf584e7-Date-2022-12-05_Time-08-49-08.log

ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b93506d7a10-Date-2022-12-05_Time-08-49-08.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b93506d7a10-Date-2022-12-05_Time-08-49-08.log

No description has been provided for this image
No description has been provided for this image
In [9]:
## make UMAP plots of
p1 <- plotEmbedding(ArchRProj = proj, colorBy = "cellColData", 
                    name = "ClustersX300", embedding = "UMAPX300")

p2 <- plotEmbedding(ArchRProj = proj, colorBy = "cellColData", 
                    name = "DoubletEnrichment", embedding = "UMAPX300")

p3 <- plotEmbedding(ArchRProj = proj, colorBy = "cellColData", 
                    name = "nFrags", embedding = "UMAPX300")

ggAlignPlots(p1, p2, p3,type = "h")
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b9383190ff-Date-2022-12-05_Time-08-49-19.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b9383190ff-Date-2022-12-05_Time-08-49-19.log

ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b9330d37c8f-Date-2022-12-05_Time-08-49-20.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 
Warning message:
“package ‘hexbin’ was built under R version 4.1.3”


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b9330d37c8f-Date-2022-12-05_Time-08-49-20.log

ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b9362a10c5b-Date-2022-12-05_Time-08-49-21.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b9362a10c5b-Date-2022-12-05_Time-08-49-21.log

No description has been provided for this image
In [10]:
# Broad MSN marker, mouse 3000600C02Rik == human KIAA1211L
# MSN markers, Ppp1r1b = DARPP-32, Bcl11b=Ctip2
markMSN3 = c('Ppp1r1b', 'Bcl11b', 'Drd1','Drd2','Drd3', 'Cpne4','Rxfp1', 'Lhx6', 'Sst', 'Pthlh')
p <- plotEmbedding( ArchRProj = proj, colorBy = "GeneScoreMatrix", 
                    name = markMSN3, embedding = "UMAPX300", imputeWeights = NULL)
p3 <- lapply(p, function(x){
  x + guides(color = FALSE, fill = FALSE) + 
    theme_ArchR(baseSize = 6.5) + theme(plot.margin = unit(c(0, 0, 0, 0), "cm")) +
    theme(  axis.text.x=element_blank(),  axis.ticks.x=element_blank(), 
            axis.text.y=element_blank(),  axis.ticks.y=element_blank())
})
do.call(cowplot::plot_grid, c(list(ncol = 3),p3))
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b9321ef15ca-Date-2022-12-05_Time-08-49-26.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-12-05 08:49:27 : 



Plotting Embedding

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b9321ef15ca-Date-2022-12-05_Time-08-49-26.log

Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
No description has been provided for this image
In [11]:
markMSN1 = c('Drd1','Tac1','Foxp2','Pdyn', 'Cpne4', 'Rxfp1') # D1 markers

# D1 MSN
p <- plotEmbedding( ArchRProj = proj, colorBy = "GeneScoreMatrix", 
                    name = markMSN1, embedding = "UMAPX300", imputeWeights = NULL) # 
p1 <- lapply(p, function(x){
  x + guides(color = FALSE, fill = FALSE) + 
    theme_ArchR(baseSize = 6.5) +
    theme(plot.margin = unit(c(0, 0, 0, 0), "cm")) +
    theme( axis.text.x=element_blank(),  axis.ticks.x=element_blank(), 
           axis.text.y=element_blank(),  axis.ticks.y=element_blank())
})
do.call(cowplot::plot_grid, c(list(ncol = 3),p1))
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b933e725ece-Date-2022-12-05_Time-08-50-03.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-12-05 08:50:03 : 



Plotting Embedding

1 
2 
3 
4 
5 
6 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b933e725ece-Date-2022-12-05_Time-08-50-03.log

Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
No description has been provided for this image
In [12]:
markMSN2 = c('Drd2','Adora2a','Penk', 'Grik3', 'Sp9', 'Gpr52')# D2 markers

# D2 MSN
p <- plotEmbedding( ArchRProj = proj, colorBy = "GeneScoreMatrix", 
                    name = markMSN2, embedding = "UMAPX300", imputeWeights = NULL)
p2 <- lapply(p, function(x){
  x + guides(color = FALSE, fill = FALSE) + 
    theme_ArchR(baseSize = 6.5) + theme(plot.margin = unit(c(0, 0, 0, 0), "cm")) +
    theme(  axis.text.x=element_blank(),  axis.ticks.x=element_blank(), 
            axis.text.y=element_blank(),  axis.ticks.y=element_blank())
})
do.call(cowplot::plot_grid, c(list(ncol = 3),p2))
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b93377146ca-Date-2022-12-05_Time-08-50-24.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-12-05 08:50:25 : 



Plotting Embedding

1 
2 
3 
4 
5 
6 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b93377146ca-Date-2022-12-05_Time-08-50-24.log

Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
No description has been provided for this image
In [13]:
markFig1 = c('Drd1', 'Drd2', 'Stxbp6', 'Fam163a', 'Gria4', 'Cpne4', 'Rxfp1', 'Casz1')

# D2 MSN
p <- plotEmbedding( ArchRProj = proj, colorBy = "GeneScoreMatrix", 
                    name = markFig1, embedding = "UMAPX300", imputeWeights = NULL)
p2 <- lapply(p, function(x){
  x + guides(color = FALSE, fill = FALSE) + 
    theme_ArchR(baseSize = 6.5) + theme(plot.margin = unit(c(0, 0, 0, 0), "cm")) +
    theme(  axis.text.x=element_blank(),  axis.ticks.x=element_blank(), 
            axis.text.y=element_blank(),  axis.ticks.y=element_blank())
})
do.call(cowplot::plot_grid, c(list(nrow = 2),p2))
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b934fb913d4-Date-2022-12-05_Time-08-50-41.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = GeneScoreMatrix

Getting Matrix Values...

2022-12-05 08:50:42 : 



Plotting Embedding

1 
2 
3 
4 
5 
6 
7 
8 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b934fb913d4-Date-2022-12-05_Time-08-50-41.log

Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
Warning message:
“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = "none")` instead.”
No description has been provided for this image
In [14]:
p1 <- plotEmbedding( proj, colorBy = "cellColData", name = "cluster_rat", embedding = "UMAPX300")
p3 <- plotEmbedding( proj, colorBy = "cellColData", name = "ClustersX300", embedding = "UMAPX300")

ggAlignPlots(p3,p1, type = "h")
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b9352e34e70-Date-2022-12-05_Time-08-51-04.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b9352e34e70-Date-2022-12-05_Time-08-51-04.log

ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b9356230cc8-Date-2022-12-05_Time-08-51-05.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b9356230cc8-Date-2022-12-05_Time-08-51-05.log

No description has been provided for this image

Integrate with snRNA-seq subclusters of MSNs¶

In [15]:
file_sce=here::here('data/tidy_data/HeKleyman2021_macaque_striatum_data_processing',
            'rdas/GSE167920_Results_MSNs_processed_final_NAc.mmGenes.sce.rds')
rna_sce = readRDS(file_sce)
In [16]:
head(colData(rna_sce))
table(colData(rna_sce)$MSN_type)
logcounts(rna_sce) = NULL
DataFrame with 6 rows and 9 columns
                   nCount_RNA nFeature_RNA nCount_SCT nFeature_SCT
                    <numeric>    <integer>  <numeric>    <integer>
GTGGTTAAGCTTCGTA-1       4635         2317       8611         2450
ATCGCCTGTTGAGGAC-1       6080         2501       8742         2520
CTGATCCAGGTCATTC-7      11201         3672       9887         3670
TCAAGTGTCTATCGGA-7      12590         3844       9973         3823
ATTCTTGCATGGAAGC-4       5007         2379       8641         2468
TCTGGCTGTTCTCTAT-7      16807         4160       9870         3841
                   integrated_snn_res.0.3    MSN_type region_name      monkey
                              <character> <character> <character> <character>
GTGGTTAAGCTTCGTA-1                      0   D1-Matrix        nacc    Monkey_P
ATCGCCTGTTGAGGAC-1                      0   D1-Matrix        nacc    Monkey_P
CTGATCCAGGTCATTC-7                      0   D1-Matrix        nacc    Monkey_P
TCAAGTGTCTATCGGA-7                      0   D1-Matrix        nacc    Monkey_P
ATTCTTGCATGGAAGC-4                      0   D1-Matrix        nacc    Monkey_P
TCTGGCTGTTCTCTAT-7                      0   D1-Matrix        nacc    Monkey_P
                      ident
                   <factor>
GTGGTTAAGCTTCGTA-1 Monkey_P
ATCGCCTGTTGAGGAC-1 Monkey_P
CTGATCCAGGTCATTC-7 Monkey_P
TCAAGTGTCTATCGGA-7 Monkey_P
ATTCTTGCATGGAAGC-4 Monkey_P
TCTGGCTGTTCTCTAT-7 Monkey_P
      D1-ICj    D1-Matrix     D1-NUDAP  D1-Shell/OT D1-Striosome D1/D2-Hybrid 
         185          535          184          518           79           58 
   D2-Matrix  D2-Shell/OT D2-Striosome 
         590          392           88 
In [17]:
#####################################
# integration split by Region region
proj <- addGeneIntegrationMatrix(
    ArchRProj = proj,
    useMatrix = "GeneScoreMatrix",
    matrixName = "GeneIntegrationMatrix",
    reducedDims = "HarmonyX300",
    seRNA = rna_sce,  nGenes = 3000, 
    addToArrow = FALSE, plotUMAP = TRUE,
    groupRNA = "MSN_type",
    nameCell = "predictedCell_Co",
    nameGroup = "predictedGroup_Co",
    nameScore = "predictedScore_Co"
)
ArchR logging to : ArchRLogs/ArchR-addGeneIntegrationMatrix-25b93394d07ba-Date-2022-12-05_Time-08-51-14.log
If there is an issue, please report to github with logFile!

2022-12-05 08:51:14 : Running Seurat's Integration Stuart* et al 2019, 0.002 mins elapsed.

2022-12-05 08:51:15 : Checking ATAC Input, 0.007 mins elapsed.

2022-12-05 08:51:15 : Checking RNA Input, 0.017 mins elapsed.

2022-12-05 08:51:17 : Found 13880 overlapping gene names from gene scores and rna matrix!, 0.055 mins elapsed.

2022-12-05 08:51:17 : Creating Integration Blocks, 0.055 mins elapsed.

2022-12-05 08:51:17 : Prepping Interation Data, 0.056 mins elapsed.

2022-12-05 08:51:19 : Computing Integration in 2 Integration Blocks!, 0 mins elapsed.

2022-12-05 08:57:26 : Block (1 of 2) : Plotting Joint UMAP, 6.115 mins elapsed.

2022-12-05 08:57:56 : Block (2 of 2) : Plotting Joint UMAP, 6.615 mins elapsed.

2022-12-05 08:58:24 : Completed Integration with RNA Matrix, 7.087 mins elapsed.

ArchR logging successful to : ArchRLogs/ArchR-addGeneIntegrationMatrix-25b93394d07ba-Date-2022-12-05_Time-08-51-14.log

Compare snATAC clusters w/ snRNA clusters¶

In [18]:
# plot the confusion matrix of cell types by predicted cell type clusters
cM <- confusionMatrix(paste0(proj$ClustersX300), paste0(proj$predictedGroup_Co))
cM <- cM / Matrix::rowSums(cM)
p <- pheatmap::pheatmap(
  mat = as.matrix(cM), 
  color = paletteContinuous("whiteBlue"), 
  border_color = "black")
p

preClust <- colnames(cM)[apply(cM, 1 , which.max)]
cbind(preClust, rownames(cM)) #Assignments
A matrix: 14 × 2 of type chr
preClust
D1-Shell/OT C8
D2-Shell/OT C4
D2-Matrix C13
D2-Matrix C14
D2-Matrix C9
D2-Matrix C11
D2-Matrix C10
D2-Matrix C12
D1/D2-HybridC5
D1/D2-HybridC6
D2-Matrix C7
D1-NUDAP C1
D1-ICj C2
D1-ICj C3
No description has been provided for this image
In [19]:
p2 <- plotEmbedding( proj, colorBy = "cellColData", name = "predictedGroup_Co", embedding = "UMAPX300")
p3 <- plotEmbedding( proj, colorBy = "cellColData", name = "cluster_macaque", embedding = "UMAPX300")

ggAlignPlots(p3, p2,  type = "h")
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b937693884a-Date-2022-12-05_Time-08-58-25.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b937693884a-Date-2022-12-05_Time-08-58-25.log

ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b932239e16b-Date-2022-12-05_Time-08-58-25.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b932239e16b-Date-2022-12-05_Time-08-58-25.log

No description has been provided for this image

Relabel cluster and call peaks¶

In [20]:
############################################
# using marker gene scores, give cluster names
remapClust = c(
  'C1'  = 'D1-NUDAP-MSN',
  'C2'  = 'D1-ICj-MSN',
  'C3'  = 'D1-ICj-MSN',
  'C4'  = 'Drop',
  'C5'  = 'D1/D2-Hybrid-MSN',
  'C6'  = 'D2-MSN',
  'C7'  = 'Drop',
  'C8'  = 'Drop',
  'C9'  = 'Drop',
  'C10' = 'Drop',
  'C11' = 'Drop',
  'C12' = 'Drop',
  'C13' = 'Drop',
  'C14' = 'Drop')
In [21]:
## perform relabelling
proj$cluster_rat_RNA2ATAC = mapLabels(proj$ClustersX300, newLabels = remapClust, oldLabels = names(remapClust))

## drop cells that aren't confidently mapped to a cell subtype
proj$cluster_rat_RNA2ATAC = ifelse(proj$cluster_rat_RNA2ATAC == 'Drop' & 
                                   !is.na(proj$cluster_rat) & grepl('^D', proj$cluster_rat), 
                          proj$cluster_rat, proj$cluster_rat_RNA2ATAC)
table(proj$cluster_rat_RNA2ATAC)
      D1-ICj-MSN           D1-MSN     D1-NUDAP-MSN D1/D2-Hybrid-MSN 
             617             2172              874             1265 
       D1/D3-MSN           D2-MSN             Drop 
             863             2645             8973 
In [22]:
## make UMAP plots
p1 <- plotEmbedding(ArchRProj = proj, colorBy = "cellColData", 
                    name = "cluster_rat", embedding = "UMAPX300")

p2 <- plotEmbedding(ArchRProj = proj, colorBy = "cellColData", 
                    name = "cluster_rat_RNA2ATAC", embedding = "UMAPX300")


ggAlignPlots(p1, p2,  type = "h")
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b932cd8ef41-Date-2022-12-05_Time-09-30-16.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b932cd8ef41-Date-2022-12-05_Time-09-30-16.log

ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b934490977-Date-2022-12-05_Time-09-30-16.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b934490977-Date-2022-12-05_Time-09-30-16.log

No description has been provided for this image
In [23]:
## make UMAP plots
p1 <- plotEmbedding(ArchRProj = proj, colorBy = "cellColData", 
                    name = "cluster_macaque", embedding = "UMAPX300")

p2 <- plotEmbedding(ArchRProj = proj, colorBy = "cellColData", 
                    name = "cluster_rat_RNA2ATAC", embedding = "UMAPX300")


ggAlignPlots(p1, p2,  type = "h")
ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b932c0ad52a-Date-2022-12-05_Time-09-30-21.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b932c0ad52a-Date-2022-12-05_Time-09-30-21.log

ArchR logging to : ArchRLogs/ArchR-plotEmbedding-25b9363267f89-Date-2022-12-05_Time-09-30-21.log
If there is an issue, please report to github with logFile!

Getting UMAP Embedding

ColorBy = cellColData

Plotting Embedding

1 


ArchR logging successful to : ArchRLogs/ArchR-plotEmbedding-25b9363267f89-Date-2022-12-05_Time-09-30-21.log

No description has been provided for this image
In [24]:
idxSample <- BiocGenerics::which(proj$Celltype2 %ni% c('Drop'))
cellsSample <- proj$cellNames[idxSample]
proj = proj[cellsSample, ]
proj = saveArchRProject(ArchRProj = proj)
Dropping ImputeWeights Since You Are Subsetting Cells! ImputeWeights is a cell-x-cell Matrix!

Saving ArchRProject...

Loading ArchRProject...

Successfully loaded ArchRProject!


                                                   / |
                                                 /    \
            .                                  /      |.
            \\\                              /        |.
              \\\                          /           `|.
                \\\                      /              |.
                  \                    /                |\
                  \\#####\           /                  ||
                ==###########>      /                   ||
                 \\##==......\    /                     ||
            ______ =       =|__ /__                     ||      \\\
        ,--' ,----`-,__ ___/'  --,-`-===================##========>
       \               '        ##_______ _____ ,--,__,=##,__   ///
        ,    __==    ___,-,__,--'#'  ==='      `-'    | ##,-/
        -,____,---'       \\####\\________________,--\\_##,/
           ___      .______        ______  __    __  .______      
          /   \     |   _  \      /      ||  |  |  | |   _  \     
         /  ^  \    |  |_)  |    |  ,----'|  |__|  | |  |_)  |    
        /  /_\  \   |      /     |  |     |   __   | |      /     
       /  _____  \  |  |\  \\___ |  `----.|  |  |  | |  |\  \\___.
      /__/     \__\ | _| `._____| \______||__|  |__| | _| `._____|
    

In [ ]: